-
Notifications
You must be signed in to change notification settings - Fork 35
chore(sponsored-feeds): use yaml format for the sponsored feed data for EVM #746
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
fdfcd9c
to
b731a07
Compare
b731a07
to
bc00d71
Compare
const networkImports = { | ||
ethereum_mainnet: () => | ||
import( | ||
"../pages/price-feeds/sponsored-feeds/data/evm/ethereum_mainnet.yaml" | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keeping separate yaml files for each network, so it is easy to access/modify the data.
@@ -55,4 +55,4 @@ The addresses represent the price feed account for shard 0 of the relevant price | |||
| FARTCOIN/USD | `2t8eUbYKjidMs3uSeYM9jXM9uudYZwGkSeTB4TKjmvnC` | `58cd29ef0e714c5affc44f269b2c1899a52da4169d7acc147b9da692e6953608` | | |||
| ACRED/USD | `6gyQ2TKvvV1JB5oWDobndv6BLRWcJzeBNk9PLQ5uPQms` | `40ac3329933a6b5b65cf31496018c5764ac0567316146f7d0de00095886b480d` | | |||
| WTI1M/USD | `nt1JuGVRBJNrvMpdZt9RJnxVSxRuoeVx5LRq3R1bS16` | `eca3fb7e6be5be55a01678ee00f6405b9e4986e32d539ccd2a06a57e0c615880` | | |||
| PUMP/USD | `HMm3GPbdnqGwbkTnUUqCFsH8AMHDdEC3Lg8gcPD3HJSH` | `7a01fca212788bba7c5bf8c9efd576a8a722f070d2c17596ff7bb609b8d5c3b9` | | |||
| PUMP/USD | `HMm3GPbdnqGwbkTnUUqCFsH8AMHDdEC3Lg8gcPD3HJSH` | `7a01fca212788bba7c5bf8c9efd576a8a722f070d2c17596ff7bb609b8d5c3b9` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is unrelated to this PR, it is from precommit prettier for merged changes.
priceDeviation: number; | ||
} | ||
// Import the data for each network. The data is in the form of a yaml file. | ||
const networkImports = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than importing all networks here, can't you make a component which will take the yaml on run?
import { useState } from "react"; | ||
import copy from "copy-to-clipboard"; | ||
|
||
export const useCopyToClipboard = (timeout: number = 2000) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we abstract this method and use it with copyAddress?
Description
Use the same yaml format as defined in the deployments repository so it is easy to update when a price feed data changes.
Type of Change
Areas Affected
There is no change in the UI. It remains the same as before.

Checklist
pre-commit run --all-files
to check for linting errorsRelated Issues
Closes #
Additional Notes
Contributor Information
Screenshots